package com.example.mall_system.entity;

import java.util.Date;

public class CartItem {
    private Integer id;
    private Long userId;  // 修改为Long类型
    private Long productId;  // 修改为Long类型
    private Integer quantity;
    private Date createTime;
    private Date updateTime;
    
    // 关联查询字段
    private Product product;

    // Getters and Setters
    public Integer getId() { return id; }
    public void setId(Integer id) { this.id = id; }
    public Long getUserId() { return userId; }
    public void setUserId(Long userId) { this.userId = userId; }
    public Long getProductId() { return productId; }
    public void setProductId(Long productId) { this.productId = productId; }
    public Integer getQuantity() { return quantity; }
    public void setQuantity(Integer quantity) { this.quantity = quantity; }
    public Date getCreateTime() { return createTime; }
    public void setCreateTime(Date createTime) { this.createTime = createTime; }
    public Date getUpdateTime() { return updateTime; }
    public void setUpdateTime(Date updateTime) { this.updateTime = updateTime; }
    public Product getProduct() { return product; }
    public void setProduct(Product product) { this.product = product; }
}